Prevent an oops in Dom0 that occurs when a CD device, specified as one
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 16 May 2006 08:40:38 +0000 (09:40 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 16 May 2006 08:40:38 +0000 (09:40 +0100)
commit4eabcb748c606ee33da37c5d874efb29a18f859a
tree5943618bf6ae2838724f69b190fec8e1538bf108
parentfc1bbeb0910029fd50a93996f727c3464b77d0aa
Prevent an oops in Dom0 that occurs when a CD device, specified as one
of the 'hardrives' in the 'disk=' line of a para-virtualized guest's
def file, has no media when the guest is started.

The oops occurs in vbd.c when vbd_size() is called from connect() (in
xenbus.c) and the vbd pointer is really an error code that comes from
the failed open that occurred in vbd_create().

Based on a patch from Ross Maxfield at Novell.

Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6-xen-sparse/drivers/xen/blkback/vbd.c